import { Drawer, DrawerProps, Empty } from 'antd'

export interface MyDrawerProps extends DrawerProps {
  content?: React.ReactNode
}
export function MyDrawer(props: MyDrawerProps) {
  const {
    width = '30%',
    destroyOnClose = true
  } = props
  return (
    <Drawer width={width} destroyOnClose={destroyOnClose} {...props}>
      {props.children ? (
        props.children
      ) : (
        <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
      )}
    </Drawer>
  )
}
